package sample;

import com.he.security.config.annotation.web.reactive.EnableWebFluxSecurity;
import com.he.security.core.userdetails.MapReactiveUserDetailsService;
import com.he.security.core.userdetails.User;
import com.he.security.core.userdetails.UserDetails;
import org.springframework.context.annotation.Bean;

@EnableWebFluxSecurity
public class HelloWebfluxSecurityConfig {

    @Bean
    public MapReactiveUserDetailsService userDetailsService() {
        UserDetails user = User.withDefaultPasswordEncoder()
                .username("user")
                .password("password")
                .roles("USER")
                .build();
        return new MapReactiveUserDetailsService(user);
    }

}
